#include "user_adc.h"
#include "adc.h"

#define LOG_TAG "user_adc"
#include "elog.h"

TaskHandle_t TaskHandle_t_adc = NULL;

void adc_create(void){
	
	xTaskCreate(task_adc,"task_adc",128,NULL,7,&TaskHandle_t_adc);
	
}

void task_adc(void * p){

	for(;;){
		
		HAL_ADC_Start(&hadc1);
		uint16_t value = HAL_ADC_GetValue(&hadc1);
		
		elog_raw("ADC:%d\n",value);
		
		vTaskDelay(1);
		
	}
	
}

